﻿using System;

namespace Crawler.DataAccess
{
    internal static class OttoCommerceDocumentConventions
    {
        public static Func<object, string> GetDocumentKeyGenerator(Func<object, string> defaultGenerator)
        {
            return o =>
                       {
                           IDocument document = o as IDocument;
                           return document == null ? defaultGenerator(o) : document.GetDocumentID();
                       };
        }

        public const string IdentityPartsSeparator = "/";
    }
}
